<?php

class indexController extends Zend_Controller_Action {

    public function init() {
        $ajaxContext = $this->_helper->getHelper('AjaxContext');

        $ajaxContext->addActionContext('list', 'html')
                //->addActionContext('modify', 'html')
                ->initContext();
    }

    public function indexAction() {

        //$auth = Zend_Auth::getInstance();
        //echo $auth->getStorage()->read()->role;
        $this->view->headLink()->appendStylesheet($this->view->baseUrl() . '/js/fullcalendar/fullcalendar.css')
                ->appendStylesheet($this->view->baseUrl() . '/js/fullcalendar/fullcalendar.print.css', 'print');

        $this->view->headScript()->appendFile($this->view->baseUrl() . '/js/fullcalendar/fullCalendar.js');
        //->appendFile($this->view->baseUrl() . '/js/fullcalendar/french.js');
    }

    public function listAction() {
// pretend this is a sophisticated database query
        $data = array('red', 'green', 'blue', 'yellow');
        $this->view->data = $data;
    }

}

